package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.pojo.Task;
import org.example.pojo.TaskType;

import java.time.LocalDate;
import java.util.List;

/**
 * @Description: mapper层
 * @Author:曹震
 * @Date: 2024/11/27 12:00
 */
@Mapper
public interface TaskMapper {
    List<Task> findTask();

    Task uniqueness(@Param("requesterId") String requesterId);

    int pass(@Param("taskId") Integer taskId);


    List<Task> listAllTask(@Param("requesterName") String requesterName,
                           @Param(("taskStatus")) Integer taskStatus,
                           @Param("taskCategory") Integer taskCategory,
                           @Param("createdAtStart") LocalDate createdAtStart,
                           @Param("createdAtEnd") LocalDate createdAtEnd);



    int refuseTaskByTaskId(Integer taskId, String objection);
    List<TaskType> listAllTaskTypes();
}
